<?php
require(dirname(__FILE__) . '/includes/init.php');
if($_REQUEST['act'] == 'view'){
	$provider = $_POST['provider'];
	$start_yema = $_POST['start_ye'];
	$end_yema = $_POST['end_ye'];
	$add_time = $_POST['add_time'];
	$start_rank = ($start_yema-1)*36;
	$end_rank = $end_yema*36+1;
	$sql = "select * from ".$ecs->table('jingdong')." where add_time = '".$add_time."' and provider='".$provider."' and ranking>".$start_rank." and ranking<".$end_rank." order by ranking";
	$provider_list = $db->getAll($sql);
}
?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>管理中心 - 历史记录 </title>
<meta name="robots" content="noindex, nofollow">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link href="styles/general.css" rel="stylesheet" type="text/css" />
<link href="styles/main.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="js/jquery.min.js"></script>
</head>
<body>
 
<h1>
<span class="action-span"><a href="e.php?act=search&start_yema=<?php echo $_POST['start_ye'];?>&end_yema=<?php echo $_POST['end_ye'];?>">回到统计列表</a></span>
<span class="action-span1"><a target="_top" href="index.php?act=main">管理中心</a> </span><span id="search_id" class="action-span1"> - 历史记录 </span>
<div style="clear:both"></div>
</h1>
  <div class="list-div" id="listDiv">
<table cellpadding="3" cellspacing="1">
  <tr>
    <th>SKU</th>
	<th>商品名</th>
	<th>商家名</th>
	<th>排名</th>
	<th>好评率</th>
	<th>评价总数</th>
    <th>历史排名</th>
  <tr>
  <?php 
	if(count($provider_list)>0){
	foreach($provider_list AS $index => $array_val){
  ?>
   <tr>
    <td><?php echo $array_val['products_sn'];?></td>
	<td><a href="http://www.360buy.com/product/<?php echo $array_val['products_sn'];?>.html" target="_blank"><?php echo $array_val['products_name'];?></a></td>
    <td><?php echo $array_val['provider'];?></td>
	<td><?php echo $array_val['ranking'];?></td>
	<td><?php echo $array_val['goodlv'];?></td>
    <td><?php echo $array_val['commentcount'];?></td>
	<td><a href="d.php?act=search&products_sn=<?php echo $array_val['products_sn'];?>">查看</a></td>
  <tr>
  <?php 
      } 
	}
  ?>
  </table>
 
<!-- 分页 -->
  </div>
</body>
</html>